#ifndef SRC_HYPERCUBE_HYPERCUBE_HMM_MINK
#define SRC_HYPERCUBE_HYPERCUBE_HMM_MINK
#include "h_mat_mul.hpp"
#include "helib_atm_wrapper.hpp"

hmm_constant_multipler *
build_hhmm_mink_constant_multipler(hmm_metric_collector *collector,
                                   const helib::EncryptedArray &ea,
                                   const cube_signature &eh_mnk);

void set_hhmm_mink_constant_multipler_clean_left(hmm_constant_multipler *cm);
void set_hhmm_mink_constant_multipler_clean_right(hmm_constant_multipler *cm);

void hhmm_mink(hmm_metric_collector *collector, hmm_constant_multipler *cm,
               const helib::EncryptedArray &ea, helib::Ctxt &AB,
               const helib::Ctxt &A, const helib::Ctxt &B);
void hhmm_mink_bsgs(hmm_metric_collector *collector, hmm_constant_multipler *cm,
                    const helib::EncryptedArray &ea, helib::Ctxt &AB,
                    const helib::Ctxt &A, const helib::Ctxt &B);

void hhmm_mink_mt(hmm_metric_collector *collector, hmm_constant_multipler *cm,
                  int threads, const helib::EncryptedArray &ea, helib::Ctxt &AB,
                  const helib::Ctxt &A, const helib::Ctxt &B);
void hhmm_mink_bsgs_mt(hmm_metric_collector *collector,
                       hmm_constant_multipler *cm, int threads,
                       const helib::EncryptedArray &ea, helib::Ctxt &AB,
                       const helib::Ctxt &A, const helib::Ctxt &B);

void hhmm_mink_rotate_align_A(hmm_constant_multipler *cm,
                              const helib::EncryptedArray &ea, helib::Ctxt &Ap,
                              const helib::Ctxt &A);
void hhmm_mink_rotate_align_B(hmm_constant_multipler *cm,
                              const helib::EncryptedArray &ea, helib::Ctxt &Bp,
                              const helib::Ctxt &B);
helib::Ctxt hhmm_mink_shift_compute_A(
    hmm_constant_multipler *cm, const helib::EncryptedArray &ea,
    const std::shared_ptr<helib::GeneralAutomorphPrecon_FULL> &hoisted_A,
    int r);

#endif /* SRC_HYPERCUBE_HYPERCUBE_HMM_MINK */
